package com.lh0811.forge.pserv.uacs.api.param;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

/**
 * 开发平台-应用资源表
 *
 * @author
 * @email
 * @date 2024-05-24 15:39:41
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class UacsPlateResCreateParam implements Serializable {

    @Schema(description = "父节点id")
    private Long pid = 0L;

    @NotBlank(message = "资源名称不能为空")
    @Schema(description = "资源名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String resName;

    @Pattern(regexp = "00|01|02", message = "资源类型不合法")
    @NotBlank(message = "资料类型不能为空")
    @Schema(description = "资源类型： 00-菜单 01-操作按钮(接口) 02-权限码", requiredMode = Schema.RequiredMode.REQUIRED)
    private String resType;

    @Schema(description = "请求地址")
    private String url;

    @Schema(description = "权限码")
    private String code;

    @Schema(description = "图标")
    private String icon;

    @Schema(description = "排序")
    private Integer orderNo;

    @Schema(description = "元数据")
    private String meta;

    @Schema(description = "备注")
    private String notes;


}
